package DBControl;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;

import Container.Center;
import Container.Criteria;
import Container.Item;
import Container.Login;
import Container.User;
import Container.UserInfo;


public interface DBInterface {
	public int checkCompletion() throws SQLException;
	public ArrayList<Item> search(Criteria cri) throws SQLException;
	public Center viewCenter(int uid) throws SQLException;
	public int comment(int uid, int iid, String comment) throws SQLException;
	public Item getHotSell() throws SQLException;
	public Item viewDetail(int iid) throws SQLException;
	public int buyout(int uid, int iid) throws SQLException;
	public int bidItem(int uid, int iid, int offer) throws SQLException;
	public int addItem(Item item) throws SQLException;
	public HashMap<String, Integer> getCategory() throws SQLException;
	public int addCategory(String name) throws SQLException;
	public int register(User user, UserInfo info) throws SQLException;
	public Login login(User user) throws SQLException;
}
